package com.haiyou.common.spring.schedule;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;


/**
 * 
 * 
 * @Description: 自定义springboot 定时器线程池
 * @author xingyuan
 * @date 2022年8月23日 下午2:13:21
 */
@Configuration
public class ScheduleConfig {

	@Bean("taskExecutor")
	public ThreadPoolTaskScheduler taskExecutor() {
		ScheduledExecutor executor = ScheduledExecutor.getInstance();
		return executor.getScheduler();
	}
	
}
